var app = getApp()
Page({
  data: {
    user_id: '',
    class_num: [],
    coach_id: '',
    order_id: ''
  },

  onLoad: function() {
    this.setData({
      user_id: wx.getStorageSync('uid')
    })
    this.classNum(this.data.user_id)
  },
  classNum(uid) {
    let that = this
    wx.request({
      url: app.url + 'weiapp/api/getStudentClass',
      data: {
        uid: uid
      },
      success: function(res) {
        console.log(res)
        that.setData({
          class_num: res.data.data
        })
      }
    })
  }

});